package com.avic.rong.userOrder;

import java.io.Serializable;

/**
 * Created by Administrator on 2016/1/25 0025.
 */
public class UploadFile implements Serializable {


    /**
     * 文件类型：图片
     */
    public static final int TYPE_IMAGE = 1;

    /**
     * 文件类型：音频
     */
    public static final int TYPE_AUDIO = 2;

    /**
     * 文件类型：视频
     */
    public static final int TYPE_VIDEO = 3;

    /**
     * 文件类型：活动中用户上传个人形象图片
     */
    public static final int TYPE_PERSONPHOTO = 4;




    /**
     * 当前文件在SD卡的绝对路径
     */
    private String filePath;

    /**
     * 服务端的相对路径，由服务端返回
     */
    private String serverPath;

    /**
     * 服务端针对当前上传文件的唯一标识
     */
    private String uuid;

    /**
     * 文件的MD5值
     */
    private String md5 = "";

    /**
     * 文件类型
     */
    private int fileType;

    /**
     * 当前文件的总字节数
     */
    private long totalBytes;

    /**
     * 已经上传的文件字节数
     */
    private long currentBytes;

    /**
     * 文件的上传状态 0为默认状态 1.上传成功
     */
    private int status;



    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public String getServerPath() {
        return serverPath;
    }

    public void setServerPath(String serverPath) {
        this.serverPath = serverPath;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getMd5() {
        return md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public int getFileType() {
        return fileType;
    }

    public void setFileType(int fileType) {
        this.fileType = fileType;
    }

    public long getTotalBytes() {
        return totalBytes;
    }

    public void setTotalBytes(long totalBytes) {
        this.totalBytes = totalBytes;
    }

    public long getCurrentBytes() {
        return currentBytes;
    }

    public void setCurrentBytes(long currentBytes) {
        this.currentBytes = currentBytes;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }


    public boolean isImage() {
        return getFileType() == TYPE_IMAGE;
    }

    public boolean isVideo() {
        return getFileType() == TYPE_VIDEO;
    }

    public boolean isAudio() {
        return getFileType() == TYPE_AUDIO;
    }


}
